001 /* 002 * Matrix.java 003 * 004 * Copyright 2003 Sergio Anibal de Carvalho Junior 005 * 006 * This file is part of NeoBio. 007 * 008 * NeoBio is free software; you can redistribute it and/or modify it under the terms of 009 * the GNU General Public License as published by the Free Software Foundation; either 010 * version 2 of the License, or (at your option) any later version. 011 * 012 * NeoBio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 013 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 014 * PURPOSE. See the GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License along with NeoBio; 017 * if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 018 * Boston, MA 02111-1307, USA. 019 * 020 * Proper attribution of the author as the source of the software would be appreciated. 021 * 022 * Sergio Anibal de Carvalho Junior mailto:sergioanibaljr@users.sourceforge.net 023 * Department of Computer Science http://www.dcs.kcl.ac.uk 024 * King's College London, UK http://www.kcl.ac.uk 025 * 026 * Please visit http://neobio.sourceforge.net 027 * 028 * This project was supervised by Professor Maxime Crochemore. 029 * 030 */ 031 032 package neobio.alignment; 033 034 /** 035 * This interface defines a minimal set of operations that a matrix must implement. This 036 * interface is used by the {@linkplain Smawk} class to provide a general services 037 * regardless of how the matrix is actually stored. 038 * 039 * @author Sergio A. de Carvalho Jr. 040 * @see Smawk 041 */ 042 public interface Matrix 043 { 044 /** 045 * Returns the value at an specified row and column. 046 * 047 * @param row row number of element to be retrieved 048 * @param col column number of element to be retrieved 049 * @return value at row <CODE>row</CODE> column <CODE>col</CODE> 050 */ 051 public int valueAt (int row, int col); 052 053 /** 054 * Returns the number of rows that this matrix has. 055 * 056 * @return number of rows 057 */ 058 public int numRows (); 059 060 /** 061 * Returns the number of columns that this matrix has. 062 * 063 * @return number of columns 064 */ 065 public int numColumns (); 066 }